<template>
	<view>
		<view class="yxfooter">
		    <view class="h50"></view>
		    <view class="neifoot bottom-line-exclude">
		        <view class="neitop">
		            <view class="weui-flex">
		                <view class="weui-flex__item" data-value="/pages/index/index" data-type="1" @tap="navigation_event">
		                    <view hover-class="none">
		                        <image class="topavatar" :src="groups_static_url+'mini/nav-icon-back.png'" />
		                        <text class="title">{{foot_info.nav_01}}</text>
		                    </view>
		                </view>
		                <view class="weui-flex__item" data-value="/pages/fcc/groups/index/index" data-type="1" @tap="navigation_event">
		                    <view v-if="propStatus == 1" class="on">
		                        <image class="topavatar" :src="groups_static_url+'mini/groups-home-on.png'" />
		                        <text class="title">{{foot_info.nav_02}}</text>
		                    </view>
		                    <view v-else>
		                        <image class="topavatar" :src="groups_static_url+'mini/groups-home.png'" />
		                        <text class="title">{{foot_info.nav_02}}</text>
		                    </view>
		                </view>
		                <view class="weui-flex__item" data-value="/pages/fcc/groups/order/order" data-type="1" @tap="navigation_event">
		                    <view v-if="propStatus == 2" class="on">
		                        <image class="topavatar" :src="groups_static_url+'mini/groups-order-on.png'" />
		                        <text class="title">{{foot_info.nav_03}}</text>
		                    </view>
		                    <view v-else>
		                        <image class="topavatar" :src="groups_static_url+'mini/groups-order.png'" />
		                        <text class="title">{{foot_info.nav_03}}</text>
		                    </view>
		                </view>
		                <view class="weui-flex__item" data-value="/pages/fcc/groups/team/team" data-type="1" @tap="navigation_event">
		                    <view v-if="propStatus == 3" class="on">
		                        <image class="topavatar" :src="groups_static_url+'mini/groups-team-on.png'" />
		                        <text class="title">{{foot_info.nav_04}}</text>
		                    </view>
		                    <view v-else>
		                        <image class="topavatar" :src="groups_static_url+'mini/groups-team.png'" />
		                        <text class="title">{{foot_info.nav_04}}</text>
		                    </view>
		                </view>
		            </view>
		        </view>
		    </view>
		</view>
	</view>
</template>
 
<script>
	const app = getApp();
	import { groups_base_info, clear_user_cach } from '@/pages/fcc/groups/public/common.js';
	var groups_static_url = app.globalData.get_static_url('groups', true);
	var common_static_url = app.globalData.get_static_url('common');
	export default {
		data() {
			return {
				groups_static_url: groups_static_url,
				common_static_url: common_static_url,
				foot_info:{
					'nav_01':'返回商城',
					'nav_02':'拼团首页',
					'nav_03':'我的订单',
					'nav_04':'我的团'
				},
			}
		},
		props: {
		    propStatus: {
				type: [Number,String],
				default: 0
			}
		},
		// 页面被展示
		created: function() {
		    this.init();
		},
		methods: {
			init() {
				// 先获取语言基础信息
				groups_base_info()
				.then(data=>{
					this.init_before(data);
				});
			},
			
			// 设置本页参数
			init_before(data){
				var self = this;
				return new Promise((resolve, reject) => {
					self.setData({
						foot_info: data.app_foot,
					});
					resolve();
				});
			},

			navigation_event(e) {
			    app.globalData.operation_event(e);
			}
		}
	}
</script>

<style>
.weui-flex {
	display: -webkit-box;
	display: -webkit-flex;
	display: flex;
}
.weui-flex__item {
	-webkit-box-flex: 1;
	-webkit-flex: 1;
	flex: 1;
}
/*公共样式*/
.yxfooter .h50 {
    height: 100rpx;
}
.yxfooter .neifoot {
    height: 96rpx;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #eee;
    z-index: 99;
}
.yxfooter .h60 {
    height: 60px;
    width: 100%;
    display: block;
}
.yxfooter .neitop {
    padding: 12rpx 0;
    font-size: 20rpx;
    text-align: center;
    position: relative;
}
.yxfooter .neitop .topavatar {
    width: 45rpx;
    height: 45rpx;
    display: block;
    margin: auto;
}
.yxfooter .neitop .topavatar2 {
    width: 80rpx;
    height: 80rpx;
    display: block;
    margin: auto;
    border-radius: 40rpx;
    background: #fff;
    position: relative;
}
.yxfooter .neitop .topavatar2 .topavatar {
    position: absolute;
    left: 15rpx;
    top: 15rpx;
}
.yxfooter .neitop .title {
    line-height: 40rpx;
}
.yxfooter .neitop .on .title {
    color:#fd302d;
}
</style>
